package com.blue.base.web.bean;


import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.context.ApplicationEvent;

import java.io.Serializable;
import java.util.Date;

/**
 * APP登录事件
 *
 * @author liulei
 * @version 1.0
 */
@Getter
@Setter
@Accessors(chain = true)
public class AppLoginEvent extends ApplicationEvent implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * Create a new ApplicationEvent.
     *
     * @param source the object on which the event initially occurred (never {@code null})
     */
    public AppLoginEvent(Object source) {
        super(source);
    }

    /**
     * 日志名称
     */
    private String logName;

    /**
     * 管理员id
     */
    private Long userId;

    /**
     * 管理员账户
     */
    private String account;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 是否执行成功
     */
    private String succeed;

    /**
     * 具体消息
     */
    private String message;

    /**
     * 登录ip
     */
    private String ipAddress;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
